﻿using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;
using TallyJ1Announcer.Properties;

namespace TallyJ1Announcer.Converters
{
	[ValueConversion(typeof(string), typeof(Brush))]
	public class VoteToColorConverter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			if ((string)value == Resources.VotingMethod_VotedInPerson)
			{
				return new SolidColorBrush(Colors.White);
			}
			return new SolidColorBrush(Colors.LightGray);
		}

		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			throw new NotImplementedException();
		}
	}
}